<head>
  <meta charset="utf8">
</head>
<body>
  <div>
    <span>姓名</span>
    <span id="name"></span>
  </div>
  <div>
    <span>性别</span>
    <span id="gender"></span>
  </div>
  <div>
    <span>电话</span>
    <span id="phone"></span>
  </div>
</body>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script>
let params = new URLSearchParams(location.search)
let id = params.get('id')
axios.get('/user?id=' + id).then(function(res) {
  res = res.data
  document.getElementById('name').innerHTML = res.data.name
  document.getElementById('gender').innerHTML = res.data.gender
  document.getElementById('phone').innerHTML = res.data.phone
})
</script>